<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>喜乐康智能家居系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%> 
	<script type="text/javascript">
		var sceneDetailPage = Math.ceil(<s:property value="deviceList.size()"/>/10);
		sceneDetailPage = (sceneDetailPage==0?1:sceneDetailPage);
		var sceneDetailListSize = <s:property value="deviceList.size()"/>;
		var sceneDetailCurrentPage = 1;

		function deviceListOpenUp(upDown){
			 listOpenUp(sceneDetailCurrentPage,"sceneDetailCurrentPage",<s:property value="deviceList.size()"/>,10,
					 "scene_use_img_right_up",
					 "room_up.png",
					 "room_up_press.png",
					 "scene_use_img_right_device_list_li",upDown);
		}
		
		
		function deviceListOpenDown(upDown){
			listOpenDown(sceneDetailCurrentPage,"sceneDetailCurrentPage",<s:property value="deviceList.size()"/>,10,
					"scene_use_img_right_down",
					"room_down.png",
					"room_down_press.png",
					"scene_use_img_right_device_list_li",upDown);
			
		}
	</script>
  </head>
  
  <body>
  	<div class="scene_use_img_right_device_list">
		<ul>
			<s:iterator id="device" value="deviceList" status="status">
				<li id="scene_use_img_right_device_list_li<s:property value="#status.index+1" />"
					<s:if test="#status.index+1 > 10">
	   					style="display:none;"
	   				</s:if>	
				>-<s:property value="roomName"/>[<s:property value="deviceName"/>]开启</li>
			</s:iterator>
		</ul>
	</div>
	<div class="scene_use_img_right_up_down">
		<div class="scene_use_img_right_up" onmousedown="deviceListOpenUp('down')" onmouseup="deviceListOpenUp('up')"></div>
		<div class="scene_use_img_right_down" onmousedown="deviceListOpenDown('down')" onmouseup="deviceListOpenDown('up')"></div>
	</div>
  </body>
</html>
